//
//  ReadTextViewController.m
//  SBooks
//
//  Created by shansander on 2016/11/16.
//  Copyright © 2016年 shansander. All rights reserved.
//

#import "ReadTextViewController.h"

@interface ReadTextViewController ()

@property (nonatomic, weak) IBOutlet UITextView * theTextView;

@end

@implementation ReadTextViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    NSString * content = [NSString stringWithContentsOfFile:self.theFilePath encoding:NSUTF8StringEncoding error:nil];
    self.theTextView.text = content;
    [self.theTextView setEditable:false];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    [self.theTextView setContentOffset:CGPointZero];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
